from django.db import models

# Create your models here.
class User(models.Model):
    username = models.CharField(max_length=16)
    password = models.CharField(max_length=16)

class User1(models.Model):
    username = models.CharField(max_length=16)

class News(models.Model):
    topic = models.CharField(max_length=100)
    sender = models.ForeignKey(to=User1,on_delete=models.CASCADE,related_name='sender_set')
    collectors = models.ManyToManyField(to=User1,related_name='collectors_set')

class Area(models.Model):
    name = models.CharField(max_length=10)
    pArea = models.ForeignKey(to='self',null=True,on_delete=models.CASCADE)